

import { onMounted, ref } from 'vue'

import { getUsersApi } from '@/api/user.js'


export function useHomeUsers () {

  const pagenum = ref(1)
  const pagesize = ref(10)
  const query = ref(null)

  const getUsers = async () => {
    let res = await getUsersApi({ pagenum: pagenum.value, pagesize: pagesize.value, query: query.value })

    console.log('user', res)

  }

  onMounted(() => {
    getUsers()
  })

  return {
    pagenum,
    pagesize,
    query
  }




}



